﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using SOAPServices.Persistencia;
using SOAPServices.Dominio;

namespace SOAPServices
{
    public class Carteleras : ICarteleras
    {

        private CarteleraDAO carteleraDAO = null;
        private CarteleraDAO CarteleraDAO
        {
            get
            {
                if (carteleraDAO == null)
                    carteleraDAO = new CarteleraDAO();
                return carteleraDAO;
            }


        }

        private PeliculaDAO peliculaDAO = null;
        private PeliculaDAO PeliculaDAO
        {
            get
            {
                if (peliculaDAO == null)
                    peliculaDAO = new PeliculaDAO();
                return peliculaDAO;
            }

        }

        private SalaDAO salaDAO = null;
        private SalaDAO SalaDAO
        {
            get
            {
                if (salaDAO == null)
                    salaDAO = new SalaDAO();
                return salaDAO;
            }

        }

        public List<Cartelera> ListarCartelera()
        {
            return CarteleraDAO.ListarTodos().ToList();
        }
        public List<Pelicula> ListarPelicula()
        {
            return PeliculaDAO.ListarTodos().ToList();
        }

        public List<Sala> ListarSala()
        {
            return SalaDAO.ListarTodos().ToList();
        }        




    }
}
